package xju_5_6.springboot_5_6.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import xju_5_6.springboot_5_6.entity.User;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where deleted = 0")
    List<User> selectAll();

    @Select("select * from user where deleted = 0 and name = #{name}")
    Page<User> page(Page<User> userPage, @Param("name") String nameStr);
}
